package com.xyoto.takeawayBusiness.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * @author Administrator
 */
@ApiModel("修改经营品类")
@Data
public class UpdateCategoryDTO {

    @ApiModelProperty("经营品类id")
    @NotNull(message = "参数异常")
    @Min(value = 0, message = "id参数异常")
    private Integer id;

    @ApiModelProperty("分类名称")
    @NotNull(message = "类别不能为空")
    private String title;

    @ApiModelProperty("类别状态（1:启用，2:未启用）")
    @NotNull(message = "状态不能为空")
    @Range(min = 1, max = 2, message = "状态参数异常")
    private Short status;

    @ApiModelProperty("顺序")
    @NotNull(message = "类别不能为空")
    private Short order;

}
